package com.wuming.house.service;

import com.wuming.house.core.BusinessException;
import com.wuming.house.model.HouseLayout;

import java.util.List;

public interface HouseLayoutService {

    /**
     * 保存楼盘户型图信息
     *
     * @param houseLayout 楼盘户型图
     * @throws BusinessException
     */
    void saveHouseLayout(HouseLayout houseLayout) throws BusinessException;

    /**
     * 修改楼盘户型图信息
     *
     * @param houseLayout 楼盘户型图
     * @throws BusinessException
     */
    void modifyHouseLayout(HouseLayout houseLayout) throws BusinessException;

    /**
     * 删除楼盘户型图信息
     *
     * @param id 户型图id
     * @throws BusinessException
     */
    void removeHouseLayoutById(Long id) throws BusinessException;

    /**
     * 根据楼盘id查询楼盘户型图信息
     *
     * @param houseId 楼盘id
     * @return 楼盘户型图
     * @throws BusinessException
     */
    List<HouseLayout> getHouseLayoutByHouseId(Long houseId) throws BusinessException;

    /**
     * 根据条件查询户型图信息
     *
     * @param houseId    楼盘id
     * @param layoutName 户型名称
     * @param pageIndex
     * @param pageSize
     * @return
     */
    List<HouseLayout> getHouseLayoutByPage(Long houseId, String layoutName, int pageIndex, int pageSize) throws BusinessException;

    /**
     * 根据条件查询总数
     *
     * @param houseId
     * @param layoutName
     * @return
     * @throws BusinessException
     */
    int getTotal(Long houseId, String layoutName) throws BusinessException;
}
